<template>
	<view class="content">
		<view class="upGradeTipsBox">
			<image class="upLogo" src="/static/icons/u69.png" mode=""></image>
			<view class="tipsText">{{ isNewText }}</view>
			<view class="tipsNum">当前版本:1.1.0.0083</view>
		</view>
		<view class="goBackBox">
			<view class="goBackBtn" @click="handleGoBack">返回</view>
		</view>
	</view>
</template>

<script setup>
	import { ref, computed } from 'vue';
	const handleGoBack = () => {
	  // 返回上一页
	  uni.navigateBack({
	    delta: 1, 
	    fail: (err) => {
	      // 返回失败回首页
	      uni.switchTab({
	        url: '/pages/index/index'
	      });
	    }
	  });
	};
	
	// 1为最新版本，0为需更新版本
	const isNew = ref(1); 
	const isNewText = computed(() => {
		let text
		if(isNew.value==0){
			return text='可更新版本'
		}else{
			return text='当前已经是最新版本'
		}
	});
</script>

<style lang="scss" scoped>
	.upGradeTipsBox{
		width: 100%;
		margin-top: 100rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;
		.upLogo{
			width: 280rpx;
			height: 280rpx;
		}
		.tipsText{
			font-size: 32rpx;
			// color: #666;
			margin-top: 30rpx;
		}
		.tipsNum{
			margin-top: 20rpx;
			font-size: 26rpx;
			color: #666;
		}
	}
	.goBackBox{
		width: 100%;
		height: 140rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		position: fixed;
		bottom: 0;
		left: 0;
	}
	.goBackBtn{
		width: 80%;
		height: 60rpx;
		background-color: #cacaca;
		border-radius: 50rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 28rpx;
		color: #fff;
	}
</style>
